<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>
        
    </title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <script src="../lib/jquery-3.4.1/jquery-3.4.1.min.js"></script>
    <script src="../lib/layui-v2.6.3/layui.js"></script>
    <link rel="stylesheet" href="../lib/layui-v2.6.3/css/layui.css">
    <script src="../js/global.js"></script>
    <link rel="stylesheet" href="lib/bootstrap/css/bootstrap.css">
    <script src="lib/bootstrap/js/bootstrap.js"></script>
    <script src="../js/echarts.min.js"></script>
</head>
<body style="height:1150px;">
<div class="container-fluid ygyd-wrapper">

    <!--相关统计-->
    <div class="row">
        <div class="col-sm-12">
            <section class="panel">
                <div class="panel-heading">咨询员添加学生的数量</div>
                <div class="panel-body">
                    <div class="echarts" id="area" style="height:300px; height:350px"></div>
                </div>
            </section>
        </div>



    </div>
</div>
<script type="text/javascript">
    // 指定图表的配置项和数据
    var myChart = echarts.init(document.getElementById('area'));
    myChart.showLoading();
    $.ajax({
        type: 'get',
        url: globalData.server+'students/netStudentReport',
		headers: {
			token: globalData.token
		},
        dataType: 'json',
        success: function(res) {
            myChart.hideLoading();
            var option = {
                title: {
                    text: '咨询员添加学生的数量',
                    subtext: '按身份',
                    x: 'center'
                },
                tooltip: {
                    trigger: 'item',
                    formatter: "{a} <br/>{b} : {c} ({d}%)"
                },

                series: [{
                    name: '咨询员',
                    type: 'pie',
                    radius: '55%',
                    center: ['50%', '60%'],
                    data: res,
                    itemStyle: {
                        emphasis: {
                            shadowBlur: 10,
                            shadowOffsetX: 0,
                            shadowColor: 'rgba(0, 0, 0, 0.5)'
                        }
                    }
                }]
            };
            // 使用刚指定的配置项和数据显示图表。
            myChart.setOption(option);
        },
        error: function() {
            alert("获取失败！！！")
        }
    });


    // 指定图表的配置项和数据


</script>


</body>
</html>